#!/bin/bash


type=${1};
number=${2};
buildName=${3};

currentPath=$(pwd);
dbugPath=$currentPath/build/dbug_build

echo "ipa start numer=${number},buildName=${buildName}"
defaults write $currentPath/ios/Runner/Info.plist CFBundleVersion $number
defaults write $currentPath/ios/Runner/Info.plist CFBundleShortVersionString $buildName

if [[ "${type}" == "1" ]]; then
	echo "分析包的大小"
	flutter build ipa --analyze-size
else
	echo "构建混淆包"
	flutter build ipa --obfuscate --split-debug-info=$dbugPath
fi


echo "split-debug-info=${dbugPath}"
